<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="cfn" uri="http://ctstudio.com/jsp/jstl/functions"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href='<spring:url value="/resources/images/favicon.ico"/>' />
<link href='<spring:url value="/resources/bootstrap/css/bootstrap.min.css"/>' rel="stylesheet" />
<link href='<spring:url value="/resources/css/full.css"/>' rel="stylesheet" />
<title>员工列表-考勤系统</title>
<script type="text/javascript" src='<c:url value="/resources/js/3rd/require.min.js" />'
	data-main='<spring:url value="/resources/js/sign/list.js"/>'></script>
</head>
<body>
	<c:set var="pageType" value="list" scope="request" />
	<div class="container">
		<jsp:include page="../topMenu.jsp" />
		<div class="panel panel-default">
			<div class="panel-heading">员工列表</div>
			<table class="table">
				<thead>
					<tr>
						<th>工号</th>
						<th>姓名</th>
						<th>主管</th>
						<th><a href='<c:url value="/staff/add.do" />'><b class="glyphicon glyphicon-plus"></b><span class="sr-only">增加</span></a></th>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="info" items="${list}">
						<tr>
							<td><c:out value="${info.staffId}" /></td>
							<td><c:out value="${info.name}" /></td>
							<td><c:out value="${info.supervisor}" /></td>
							<td><a href='<c:url value="/staff/edit.do?id=${info.id}" />'><b class="glyphicon glyphicon-pencil"></b><span class="sr-only">修改</span></a>&nbsp;<a
								href='<c:url value="/staff/del.do?id=${info.id}" />'><b class="glyphicon glyphicon-trash"></b><span class="sr-only">删除</span></a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div class="panel-footer">
				<c:set var="totalPage" value="${cfn:roundUp(total/query.s)}" />
				共${total}条，
				<c:if test="${query.p>1}">
					<a id="prev">上一页</a>
				</c:if>
				${query.p}/${totalPage}
				<c:if test="${query.p<totalPage}">
					<a id="next">下一页</a>
				</c:if>
			</div>
		</div>
	</div>
</body>
</html>